package com.spider.admin.store.primary.model;


import com.spider.admin.conf.validator.UniqueValue;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.validation.annotation.Validated;

@Getter
@Setter

@Validated
@Entity
@Table(name = "t_client_info")

@Accessors(chain = true)

@Data
@EqualsAndHashCode(callSuper = true)
public class ClientInfo extends SuperVO {
    @Id
    @Column(name = "pid")
    private String pid;
    @NotEmpty(message = "客户端名称不能为空", groups = {Save.class})
    @UniqueValue(domainClass = ClientInfo.class, fieldName = "clientName", message = "客户端名称不能重复", groups = {Save.class})
    @Column(name = "client_name")
    private String clientName;

    //@NotEmpty(message = "客户端Key不能为空",groups = Save.class)
    @Column(name = "client_key")
    private String clientKey;




    @Column(name = "tenant_id")
    private String tenantId;

    //    @NotEmpty(message = "授权日期不能为空", groups = Save.class)
    @Column(name = "grant_date")
    private String grantDate;
    @Column(name = "end_date")
    private String endDate;
    @Column(name = "client_desc")
    private String clientDesc;

    @Column(name = "archive_status")
    private String archiveStatus;


}

